/*
 * Copyright (c) 2023 vitasystems GmbH
 *
 * This file is part of project EHRbase Migration Tool
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.ehrbase.migration.exporter.v0.jooq.pg.routines;

import org.ehrbase.migration.exporter.v0.jooq.pg.Ehr;
import org.jooq.JSONB;
import org.jooq.Parameter;
import org.jooq.impl.AbstractRoutine;
import org.jooq.impl.Internal;
import org.jooq.impl.SQLDataType;

/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({"all", "unchecked", "rawtypes"})
public class JsonEntryMigrate extends AbstractRoutine<java.lang.Void> {

    private static final long serialVersionUID = 1L;

    /**
     * The parameter <code>ehr.json_entry_migrate.jsonb_entry</code>.
     */
    public static final Parameter<JSONB> JSONB_ENTRY =
            Internal.createParameter("jsonb_entry", SQLDataType.JSONB, false, false);

    /**
     * The parameter <code>ehr.json_entry_migrate.out_composition_name</code>.
     */
    public static final Parameter<String> OUT_COMPOSITION_NAME =
            Internal.createParameter("out_composition_name", SQLDataType.CLOB, false, false);

    /**
     * The parameter <code>ehr.json_entry_migrate.out_new_entry</code>.
     */
    public static final Parameter<JSONB> OUT_NEW_ENTRY =
            Internal.createParameter("out_new_entry", SQLDataType.JSONB, false, false);

    /**
     * Create a new routine call instance
     */
    public JsonEntryMigrate() {
        super("json_entry_migrate", Ehr.EHR);

        addInParameter(JSONB_ENTRY);
        addOutParameter(OUT_COMPOSITION_NAME);
        addOutParameter(OUT_NEW_ENTRY);
    }

    /**
     * Set the <code>jsonb_entry</code> parameter IN value to the routine
     */
    public void setJsonbEntry(JSONB value) {
        setValue(JSONB_ENTRY, value);
    }

    /**
     * Get the <code>out_composition_name</code> parameter OUT value from the
     * routine
     */
    public String getOutCompositionName() {
        return get(OUT_COMPOSITION_NAME);
    }

    /**
     * Get the <code>out_new_entry</code> parameter OUT value from the routine
     */
    public JSONB getOutNewEntry() {
        return get(OUT_NEW_ENTRY);
    }
}
